new Vue({
    el: '#app',
    data: {
        adTime: '',
        leaTime: '',
        infect: '',
        infectDet: '',
        pctScore: '',
        perject: '',
        bloods: '',
        usedays: '',
        others: '',
    },
    methods: {
        goto() {
            if (this.adTime == '') {
                this.$toast('请填写入院时间')
            } else if (this.leaTime == '') {
                this.$toast('请填写出院时间')
            } 
            else if(this.adTime>this.leaTime){
                this.$toast('出入院填写时间有误')
            }
            else if (this.infect == '') {
                this.$toast("请填写是否感染")
            } else if (this.pctScore == '') {
                this.$toast('请填写PCT评分')
            } else if (this.perject == '') {
                this.$toast('请填写详细治疗方案')
            } else if (this.bloods == '') {
                this.$toast('请填写血必净使用剂量')
            } else if (this.usedays == '') {
                this.$toast('请填写血必净使用天数')
            } else if (this.others == '') {
                this.$toast('请填写其他联合使用药物')
            } else {
                localStorage.setItem("secondIndex",2)
                window.location.href = "SRISHistory.html"
            }
        }
    },
    updated() {
        if (this.infect == 'no') {
            this.$refs.infectD.disabled = true;
            this.$refs.infectD.value = '';
        } else if (this.infect == 'yes') {
            this.$refs.infectD.disabled = false;
            if (this.infectDet == '') {
                this.$toast("请填写感染详细")
            }
        }
    },
})